<template>
  <div id="app">
    <div class="oll">
      <ol>
        <li v-for="i in anime" :key="i.id">{{ i.name }}</li>
      </ol>
    </div>
    <Children @GetDate="GetDate"></Children>

  </div>
</template>

<script>
import _ from 'lodash'

import Children from "@/components/Children";
import List from "../17.github搜索/components/List";
export default {
  name: "App",
  components:{
    Children
  },
  data(){
    return{
      anime:[]
    }
  },
  methods:{
    GetDate(anime){
      //浅拷贝
      this.anime = anime
    //  深拷贝
    //   this.anime = _.cloneDeep(anime)
    }
  }

}
</script>

<style scoped>
  #app{
    height: 400px;
    background-color: pink;
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
  .oll{
    height: 300px;
    background-color: yellow;
    color: #122b40;
  }
</style>